package org.bt.common.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * Token
 *
 * @author tongw
 * @date 2021/8/12
 */
@Data
public class Token {

    @ApiModelProperty(value = "访问令牌")
    private String token;
    @ApiModelProperty(value = "令牌失效时间")
    private long expire;

    @JsonIgnore
    public Object getPrincipal() {
        return token;
    }

    @JsonIgnore
    public Object getCredentials() {
        return token;
    }
}
